package com.taxshare.api.view.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;

@Data
@JsonInclude(NON_NULL)
@ApiModel(description = "发票查验请求体")
public class PurchaserApiDTO {

    private String appid;
    private String content;
    private String jtnsrsbh;
    private String nsrsbh;
    private String serviceid;
    private String signature;
    private String signType;

    @Override
    public String toString() {
        String str = StringUtils.isNotBlank(nsrsbh) ? "&nsrsbh=" + nsrsbh : "&nsrsbh";
        return "?appid=" + appid +
                "&content=" + content +
                "&jtnsrsbh=" + jtnsrsbh + str +
                "&serviceid=" + serviceid;
    }
}
